package com.entity;

import java.io.Serializable;

/**
 * @author 
 */
public class Address implements Serializable {
    private Integer aid;

    private String aname;

    private Integer alevel;

    private Integer apid;

    private String adesc;

    private static final long serialVersionUID = 1L;

    public Integer getAid() {
        return aid;
    }

    public void setAid(Integer aid) {
        this.aid = aid;
    }

    public String getAname() {
        return aname;
    }

    public void setAname(String aname) {
        this.aname = aname;
    }

    public Integer getAlevel() {
        return alevel;
    }

    public void setAlevel(Integer alevel) {
        this.alevel = alevel;
    }

    public Integer getApid() {
        return apid;
    }

    public void setApid(Integer apid) {
        this.apid = apid;
    }

    public String getAdesc() {
        return adesc;
    }

    public void setAdesc(String adesc) {
        this.adesc = adesc;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Address other = (Address) that;
        return (this.getAid() == null ? other.getAid() == null : this.getAid().equals(other.getAid()))
            && (this.getAname() == null ? other.getAname() == null : this.getAname().equals(other.getAname()))
            && (this.getAlevel() == null ? other.getAlevel() == null : this.getAlevel().equals(other.getAlevel()))
            && (this.getApid() == null ? other.getApid() == null : this.getApid().equals(other.getApid()))
            && (this.getAdesc() == null ? other.getAdesc() == null : this.getAdesc().equals(other.getAdesc()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getAid() == null) ? 0 : getAid().hashCode());
        result = prime * result + ((getAname() == null) ? 0 : getAname().hashCode());
        result = prime * result + ((getAlevel() == null) ? 0 : getAlevel().hashCode());
        result = prime * result + ((getApid() == null) ? 0 : getApid().hashCode());
        result = prime * result + ((getAdesc() == null) ? 0 : getAdesc().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", aid=").append(aid);
        sb.append(", aname=").append(aname);
        sb.append(", alevel=").append(alevel);
        sb.append(", apid=").append(apid);
        sb.append(", adesc=").append(adesc);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}